package com.lhd.action.iterator;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: liuhd
 * @Date: 2024/12/19 13:20
 * @Description: 抽象迭代器
 */
public abstract class BookIterator {
    protected List<Book> bookList = new ArrayList<>();
    protected int index;

    public BookIterator(List<Book> bookList) {
        this.bookList = bookList;
    }

    abstract Book next();
    abstract boolean hasNext();
}
